package ar.edu.unicen.exa.oop.bbquery.controller.commands;

import org.puremvc.java.multicore.interfaces.ICommand;
import org.puremvc.java.multicore.interfaces.INotification;
import org.puremvc.java.multicore.patterns.command.SimpleCommand;

import ar.edu.unicen.exa.oop.bbquery.MainClass;
import ar.edu.unicen.exa.oop.bbquery.MainForm;
import ar.edu.unicen.exa.oop.bbquery.facade.AppFacade;
import ar.edu.unicen.exa.oop.bbquery.model.proxies.DataModelProxy;
import ar.edu.unicen.exa.oop.bbquery.view.mediators.LabelMediator;
import ar.edu.unicen.exa.oop.bbquery.view.mediators.TextComponentMediator;

public class StartupCommand extends SimpleCommand implements ICommand {

    public void execute(INotification notification)
    {
    	AppFacade f=(AppFacade)notification.getBody();
        System.out.println("startup execute (command) " + f);
        
        MainForm frm = MainClass.getFrame();

		f.registerProxy(new DataModelProxy());		
		f.registerMediator(new TextComponentMediator(frm.getJButton0(), frm.getJTextField0())); 
		f.registerMediator(new LabelMediator(frm.getJLabel0()));
    }
}
